/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2020-04-28
 * Time: 16:07
 */
#include <iostream>
#include <unordered_map>
#include <map>
using namespace std;

//父类的map 大于子类的 unordered_map
class father{
public:
    void printsss(map<int,int> &m){
        cout<<"father is call!!"<<endl;
    }
};

class son : public father{
public:
    void printsss(unordered_map<int,int> &a){
        cout<<"son is call!!"<<endl;
    }
};

//父类的 uordered_map 小于子类的 map
class father2{
public:
    void printsss(unordered_map<int,int> &m){
        cout<<"father is call!!"<<endl;
    }
};

class son2 : public father2{
public:
    void printsss(map<int,int> &a){
        cout<<"son is call!!"<<endl;
    }
};


int main(){
    //父类的map 大于子类的 unordered_map
    //father *f = new father();
    //map<int,int> m1;
    //f->printsss(m1);
    //
    //son *s = new son();
    //unordered_map<int, int> m2;
    //s->printsss(m2);

    //父类的 uordered_map 小于子类的 map
    father2 *f = new father2();
    unordered_map<int, int> m1;
    f->printsss(m1);

    son2 *s = new son2();
    map<int, int> m2;
    s->printsss(m2);

    return 0;
}